package com.wjj.sixinone.common.util;

import java.io.Serializable;
import java.util.HashMap;

//@ApiModel(value = "Result")
public class Result extends HashMap<String, Object> implements Serializable {

    public static Result ok(){
        Result result = new Result();
        result.put("code", 200);
        result.put("message", "操作成功");
        return result;
    }

    public static Result error(Integer code,String msg){
        Result result = new Result();
        result.put("code", code);
        result.put("message", msg);
        return result;
    }

    @Override
    public Result put(String key, Object value) {
        super.put(key, value);
        return this;
    }
}
